/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.unifor.sd.bolsa.interfaces;

/**
 *
 * @author luis
 */
public class ClienteBridge {

    private ClienteInterface ci;

    public ClienteBridge(ClienteInterface ci) {
        this.ci = ci;
    }

    public void conect(String ip, Integer porta) throws Exception {
        ci.conectar(ip, porta);
    }

    public void disconect() throws Exception {
        ci.encerrarConexao();
    }

    public void listen() {
        ci.escutar();
    }

    public void addListener(ListListener listener) {
        ci.addListener(listener);
    }

    public void init() throws Exception {
        ci.iniciar();
    }

    public void buyAction(Integer acaoId) throws Exception {
        ci.comprarAcao(acaoId);
    }

    public void buyActionWithValue(Integer acaoId, Double valor) throws Exception {
        ci.comprarAcaoValor(acaoId, valor);
    }

    public void sellAction(Integer acaoId) throws Exception {
        ci.venderAcao(acaoId);
    }

    public void setOwner(String dono) {
        ci.setDono(dono);
    }
}
